package net.lab1024.sa.admin.module.business.school.room.dao;

import java.util.List;
import net.lab1024.sa.admin.module.business.school.room.domain.entity.RoomEntity;
import net.lab1024.sa.admin.module.business.school.room.domain.form.RoomQueryForm;
import net.lab1024.sa.admin.module.business.school.room.domain.vo.RoomVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * 房间 Dao
 *
 * @Author ZouYang
 * @Date 2024-12-28 12:10:44
 * @Copyright ZouYang
 */

@Mapper
@Component
public interface RoomDao extends BaseMapper<RoomEntity> {

    /**
     * 分页 查询
     *
     * @param page
     * @param queryForm
     * @return
     */
    List<RoomVO> queryPage(Page page, @Param("queryForm") RoomQueryForm queryForm);

    /**
     * 更新删除状态
     */
    long updateDeleted(@Param("id")Long id,@Param("deletedFlag")boolean deletedFlag);

    /**
     * 批量更新删除状态
     */
    void batchUpdateDeleted(@Param("idList")List<Long> idList,@Param("deletedFlag")boolean deletedFlag);

}
